<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>项目名称:</label>
        <div class="col-xs-12 col-sm-8">
            <input class="form-control" id="name" name="row[name]" type="text" placeholder="请填写项目名称" value="{$row.name}" {:$isSuperAdmin?'':'data-rule="required"'}>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>总投资(亿元):</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input class="form-control " id="investment_total" name="row[investment_total]" type="text"  placeholder="请填写总投资(亿)" value="{$row.investment_total}"  onkeyup="clearNoNum(this)" {:$isSuperAdmin?'':'data-rule="required"'}>
                <span class="input-group-addon">
                    <input type="checkbox" class="pending" data-id="investment_total">待定
                                    </span>
                <span class="msg-box n-right"></span>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>项目简介:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea  class="form-control"  id="summary" name="row[summary]" rows="5" cols="50" placeholder="请填写项目简介" {:$isSuperAdmin?'':'data-rule="required"'}>{$row.summary}</textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>进展情况:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea  class="form-control" id="progression" name="row[progression]" rows="5" cols="50" placeholder="请填写进展情况" {:$isSuperAdmin?'':'data-rule="required"'}>{$row.progression}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>存在问题:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea  class="form-control"  id="problem" name="row[problem]" rows="5" cols="50" placeholder="请填写存在问题" {:$isSuperAdmin?'':'data-rule="required"'}>{$row.problem}</textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>下一步措施:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea  class="form-control" id="next_measure" name="row[next_measure]" rows="5" cols="50" placeholder="请填写下一步措施" {:$isSuperAdmin?'':'data-rule="required"'}>{$row.next_measure}</textarea>
        </div>
    </div>





    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">计划准入时间:</label>
        <div class="col-xs-12 col-sm-8">
            <input class="form-control datetimepicker"  type="text" id="access_time" name="row[access_time]"  data-date-format="YYYY-MM-DD" placeholder="请填写计划准入时间" value="{$row.access_time_text}">
            <span class="msg-box n-right"></span>
        </div>
    </div>

<!--     <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">计划签约时间:</label>
        <div class="col-xs-12 col-sm-8">
            <input class="form-control datetimepicker"  type="text" id="sign_time" name="row[sign_time]"  data-date-format="YYYY-MM-DD" data-use-current="true" placeholder="请填写计划签约时间" value="{$row.sign_time_text}">
        </div>
    </div> -->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>投资方地区:</label>
        <div class="col-xs-12 col-sm-8">
            <input class="form-control" id="name" name="row[investment_area]" type="text" placeholder="请填写投资方地区" value="{$row.investment_area}" {:$isSuperAdmin?'':'data-rule="required"'}>
        </div>
    </div>



    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>接洽时间:</label>
        <div class="col-xs-12 col-sm-8">
            <input class="form-control datetimepicker"  type="text" id="receive_time" name="row[receive_time]"  data-date-format="YYYY-MM-DD" data-use-current="true" placeholder="请填写接洽时间" {:$isSuperAdmin?'':'data-rule="required"'} value="{$row.receive_time_text}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>责任单位:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">


                {if $isSuperAdmin}
                {:build_select('row[chargedep_ids][]',$chargeDeps,$row['chargedep_ids'],['id'=>"chargedep_ids",'multiple'=>true,'class'=>'form-control selectpicker'])}
                {else/}
                {:build_select('row[chargedep_ids][]',$chargeDeps,$row['chargedep_ids'],['id'=>"chargedep_ids",'multiple'=>true,'class'=>'form-control selectpicker','data-rule'=>'required'])}
                {/if}

                <span class="input-group-addon">
                    <input type="checkbox" class="pending" data-type="select" data-id="chargedep_ids" id="N402255806405">待定
                </span>
                <span class="msg-box n-right" style="display: none;"></span>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>区领导:</label>
        <div class="col-xs-12 col-sm-8">


            {if $isSuperAdmin}
            {:build_select('row[leader_ids][]',$leaders,$row['leader_ids'],['id'=>"leader_ids",'multiple'=>true,'class'=>'form-control selectpicker'])}
            {else/}
            {:build_select('row[leader_ids][]',$leaders,$row['leader_ids'],['id'=>"leader_ids",'multiple'=>true,'class'=>'form-control selectpicker','data-rule'=>'required'])}
            {/if}

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>落户街道:</label>

        <div class="col-xs-12 col-sm-8">
            <div class="input-group">


                {if $isSuperAdmin}
                {:build_select('row[settle_street_ids][]',$streets,$row['settle_street_ids'],['id'=>"settle_street_ids",'multiple'=>true,'class'=>'form-control selectpicker'])}
                {else/}
                {:build_select('row[settle_street_ids][]',$streets,$row['settle_street_ids'],['id'=>"settle_street_ids",'multiple'=>true,'class'=>'form-control selectpicker','data-rule'=>'required'])}
                {/if}


                <span class="input-group-addon">
                    <input type="checkbox" class="pending" data-type="select" data-id="settle_street_ids" id="N402255806404">待定
                </span>
                <span class="msg-box n-right" style="display: none;"></span>
            </div>
        </div>

    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>{:__('Centraloffice_id')}:</label>
        <div class="col-xs-12 col-sm-8">

            {if $isSuperAdmin}
            {:build_select('row[centraloffice_id][]',$centraloffices,$row['centraloffice_id'],['id'=>"centraloffice_id",'multiple'=>true,'class'=>'form-control selectpicker'])}
            {else/}
            {:build_select('row[centraloffice_id][]',$centraloffices,$row['centraloffice_id'],['id'=>"centraloffice_id",'multiple'=>true,'class'=>'form-control selectpicker','data-rule'=>'required'])}
            {/if}

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span class="text-red">*</span>{:__('科室责任人')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input class="form-control" id="contact_name" name="row[contact_name]" type="text" placeholder="请填写科室责任人" value="{$row.contact_name}" data-rule="required">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>当前阶段:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[state]',[null=>'请选择','终止'=>'终止','暂停'=>'暂停','在谈'=>'在谈','框架'=>'框架','正式'=>'正式','注册'=>'注册','开工'=>'开工','运营'=>'运营'],$row['state'],['id'=>"state",'class'=>'form-control','data-rule'=>'required'])}
        </div>
    </div>


        <div class="form-group state_time stop_reason_d {if $row.state!='终止'}hide{/if}">
            <label class="control-label col-xs-12 col-sm-2"><span class="text-red">*</span>终止原因:</label>
            <div class="col-xs-12 col-sm-8">
                <textarea  class="form-control" id="stop_reason" name="row[stop_reason]" rows="5" cols="50" placeholder="请填写终止原因">{$row.stop_reason}</textarea>
            </div>
        </div>

<!--        <div class="form-group state_time stop_reason_d {if $row.state!='终止'}hide{/if}">-->
<!--            <label class="control-label col-xs-12 col-sm-2">终止时间:</label>-->
<!--            <div class="col-xs-12 col-sm-8">-->
<!--                <input class="form-control datetimepicker"  type="text" id="stop_time" name="row[stop_time]"  data-date-format="YYYY-MM-DD" placeholder="请填写终止时间" value="{$row.stop_time_text}">-->
<!--            </div>-->
<!--        </div>-->


        <div class="form-group state_time framework_agreement_d {if $row.state!='框架'}hide{/if}">
            <label class="control-label col-xs-12 col-sm-2"><span class="text-red">*</span>框架协议时间:</label>
            <div class="col-xs-12 col-sm-8">
                <input class="form-control datetimepicker"  type="text" id="framework_agreement_time" name="row[framework_agreement_time]"  data-date-format="YYYY-MM-DD" placeholder="请填写框架协议时间" value="{$row.framework_agreement_time_text}">
            </div>
        </div>

        <div class="form-group state_time invesment_agreement_d {if $row.state!='正式'}hide{/if}">
            <label class="control-label col-xs-12 col-sm-2"><span class="text-red">*</span>正式协议时间:</label>
            <div class="col-xs-12 col-sm-8">
                <input class="form-control datetimepicker"  type="text" id="invesment_agreement_time" name="row[invesment_agreement_time]"  data-date-format="YYYY-MM-DD" placeholder="请填写正式协议时间" value="{$row.invesment_agreement_time_text}">
            </div>
        </div>

        <div class="form-group state_time register_d {if $row.state!='注册'}hide{/if}">
            <label class="control-label col-xs-12 col-sm-2"><span class="text-red">*</span>注册时间:</label>
            <div class="col-xs-12 col-sm-8">
                <input class="form-control datetimepicker"  type="text" id="register_time" name="row[register_time]"  data-date-format="YYYY-MM-DD" data-use-current="true" placeholder="请填写注册时间" value="{$row.register_time_text}">
            </div>
        </div>

        <div class="form-group state_time start_construction_d {if $row.state!='开工'}hide{/if}">
            <label class="control-label col-xs-12 col-sm-2"><span class="text-red">*</span>开工时间:</label>
            <div class="col-xs-12 col-sm-8">
                <input class="form-control datetimepicker"  type="text" id="start_construction_time" name="row[start_construction_time]"  data-date-format="YYYY-MM-DD" data-use-current="true" placeholder="请填写开工时间" value="{$row.start_construction_time_text}">
            </div>
        </div>


        <div class="form-group state_time operation_time_d {if $row.state!='运营'}hide{/if}">
            <label class="control-label col-xs-12 col-sm-2"><span class="text-red">*</span>运营时间:</label>
            <div class="col-xs-12 col-sm-8">
                <input class="form-control datetimepicker"  type="text" id="operation_time" name="row[operation_time]"  data-date-format="YYYY-MM-DD" data-use-current="true" placeholder="请填写运营时间" value="{$row.operation_time_text}">
            </div>
        </div>

<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">本次修改是否涉及接洽</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input type="checkbox" name="row[record]" id="record" value="1"> <label for="record"> 是（勾选后会增加一次接洽记录）</label>-->
<!--        </div>-->
<!--    </div>-->

<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">本次接洽记录接洽新项目</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <div class="radio"><label for="row[is_new]-0"><input id="row[is_new]-0" name="row[is_new]" type="radio" value="0" disabled="disabled"> 否</label> <label for="row[is_new]-1"><input id="row[is_new]-1" checked="checked" name="row[is_new]" type="radio" value="1" disabled="disabled"> 是</label></div>-->
<!--        </div>-->
<!--    </div>-->

    <div class="panel panel-success">
        <div class="panel-heading">
            <h3 class="panel-title">接洽记录</h3>
        </div>
        <table class="table table-bordered text-center">
            <tr>
                <th>接洽时间</th>
                <th>接洽领导</th>
                <th>详情</th>
                <th>编辑</th>
                <th>删除</th>
            </tr>
            {volist name='records' id='vo'}
            <tr {eq name="vo.id" value="$row.id"}class="text-danger"{/eq}>
                <td class="text-center">{$vo.receive_time_text}</td>
                <td class="text-center">{$vo.leader_names}</td>
                <td class="text-center"><a href="javascript:;" class="btn-success btn-sm info" data-ids="{$vo.id}">详情</a></td>
                <td class="text-center"><a href="{:url('edit','ids='.$vo['id'])}" class="btn-success btn-sm " >编辑</a></td>
                {if $vo.id != $row.id}
                <td class="text-center"><a href="javascript:;" class="btn-danger single_clear btn-sm" data-item_id="{$vo.id}">删除</a> </td>
                {/if}
            </tr>
            {/volist}
        </table>
    </div>

    {if $progress_list}
    <div class="panel panel-success">
        <div class="panel-heading">
            <h3 class="panel-title">进展情况</h3>
        </div>
        <table class="table table-bordered text-center">
            <tr>
                <th>进展详情</th>
                <th>存在问题</th>
                <th>下一步措施</th>
                <th>进展时间</th>
                <th>操作</th>
            </tr>
            {volist name='progress_list' id='vo'}
            <tr {eq name="vo.id" value="$row.id"}class="text-danger"{/eq}>
            <td class="text-center" style="width: 25%">{$vo.content}</td>
            <td class="text-center" style="width: 20%">{$vo.problem}</td>
            <td class="text-center" style="width: 25%">{$vo.next_measure}</td>
            <td class="text-center">{$vo.progress_time_text}</td>
            <td class="text-center">
                <a href="centralcontact/editprogress/ids/{$vo.id}" class="btn-success btn-sm edit btn-dialog" data-name="编辑-{$vo.progress_time_text}" title="编辑" data-ids="{$vo.id}">编辑</a>
                <a href="javascript:;" class="btn-danger btn-sm single_clear_progress" data-item_id="{$vo.id}">删除</a>
            </td>
            </tr>
        {/volist}

        </table>
    </div>
    {/if}

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed">确定</button>
            <button type="reset" class="btn btn-default btn-embossed">重置</button>
        </div>
    </div>
</form>
